<template>
  <div class="params" v-if="Object.keys(params).length!==0">
    <p>参数信息</p>
    <table class = "sizes" v-for="(item,index) in params.sizes" :key="index">
      <tr v-for="(tr,indey) in item" :key="indey">
        <td v-for="(td,indez) in tr" :key="indez">{{td}}</td>
      </tr>
    </table>

    <table class="infos">
      <tr v-for="(tr,index) in params.infos" :key="index">
        <td class="key">{{tr.key}}<br/></td>
        <td class="value">{{tr.value}}</td>
      </tr>
    </table>
    <div class="info-img" v-if="params.image.length !== 0">
      <img :src="params.image" alt="" />
    </div>
  </div>
</template>
<script>
export default {
  name:"DetailComment",
  props:{
    params:{
      type:Object,
      default:function(){
        return {}
      }
    }
  }

}
</script>
<style scoped>
.params {
  font-size: 14px;
  padding: 20px 15px;
  border-bottom: 5px solid #f2f5f8;
  
}
.params p{
  font-size: 12px;
  margin-bottom: 10px;
}
table{
  width: 100%;
  border-collapse: collapse;
}
 .params table tr {
    height: 42px;
  }
.params table tr td {
    border-bottom: 1px solid rgba(100, 100, 100, 0.1);
  }
.params .value{
  color:red
}
.params .infos .key{
  width:95px;
}
.info-img img{
  width: 100%;

}
</style>